Empty the bidi cache "stack" when it->sp is zeroed.
authorEli Zaretskii <eliz@gnu.org>
Tue, 5 Jul 2011 17:06:29 +0000 (20:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 5 Jul 2011 17:06:29 +0000 (20:06 +0300)
commitf6254cce90b2d27490b838fda6cadf786c58e049
treee44a41af2872fc54acf27555848c463cf4134ae8
parent746165c4a3fe05cf2d14a826c6c4ab5907566b92
Empty the bidi cache "stack" when it->sp is zeroed.
Solves crashes due to overflow of bidi cache stack.
Make sure cache is saved and restored around all temporary iterations.

 src/dispnew.c (buffer_posn_from_coords): Save and restore the bidi
 cache around display iteration.
 src/window.c (Fwindow_end, window_scroll_pixel_based)
 (displayed_window_lines, Frecenter): Save and restore the bidi
 cache around display iteration.
 src/bidi.c (bidi_unshelve_cache): Ensure we have enough space before
 restoring the shelved cache.
 (bidi_cache_ensure_space): Don't assume the required size is just
 one BIDI_CACHE_CHUNK away.
 src/xdisp.c (back_to_previous_visible_line_start, reseat_1)
 (init_iterator): Empty the bidi cache "stack".
src/ChangeLog
src/bidi.c
src/dispnew.c
src/indent.c
src/window.c
src/xdisp.c